module.exports = {
    host: 'https://cxfotile.mingm.com.cn',
    request: function(url, data, method, success, fail) {
        data = JSON.stringify(data)
        console.log(data)
        wx.request({
            url: this.host + url,
            method: method,
            data: data,
            header: {
                'content-type': 'application/json',
            },
            success: success,
            fail: fail
        })
    },
    requestFrom: function(url, data, method, success, fail) {
        // data = JSON.stringify(data)
        console.log(data)
        wx.request({
            url: this.host + url,
            method: method,
            data: data,
            header: {
                'content-type': 'application/x-www-form-urlencoded',
            },
            success: success,
            fail: fail
        })
    },
}